package java67_10;

import java.util.Scanner;

public class SendGift {

	public static void main(String[] args) {
		// 超市根据积分发放礼品
		Scanner in = new Scanner(System.in);
		// Gift g = new Gift();/// 错误的
		while (true) {
			System.out.println("请输入积分:");
			int score = in.nextInt();
			if (score >= 15000) {
				Gift g = new Gift();
				g.name = "苹果笔记本电脑";
				g.price = 14999;
				g.show();
			} else if (score >= 8000) {
				Gift g = new Gift();
				g.name = "爱疯12";
				g.price = 7999;
				g.show();
			} else {
				System.out.println("积分不足,不能兑换");
			}
			System.out.print("要不要继续?");
			String answ = in.next();
			if (answ.equals("n"))
				break;
		}
		System.out.println("程序结束");
	}

}
